home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / graphics / pep15.zip / CHAPT16.TXT < prev    next >
Text File  |  1993-12-14  |  21KB  |  394 lines

  1. <Chapter 16:  Hints, Tricks and Warnings>
  2.      In designing PEP, we have put a great deal of emphasis on
  3. flexibility. We have tried as much as possible to divide PEP's
  4. functionality into elementary features that you can control independently
  5. and combine to accomplish a wide variety of drawing goals. We have tried
  6. not to prejudge what your drawing tasks might be, or limit how you might
  7. combine PEP's features to accomplish them.
  8.  
  9.      But this flexibility carries a cost with it. Sometimes, to accomplish
  10. a simple thing it is necessary to change several settings, and the best
  11. approach to a given problem is often not obvious at first. In the
  12. preceding chapters, we have discussed, one by one, the individual
  13. functions that PEP offers. Here we give a few examples of how to use these
  14. features, especially in combination, to solve particular problems.
  15.  
  16. <Section 16.1:  How to Center Text>
  17.      In PEP, centered text is positioned between the left edge (L) and the
  18. right edge (R) of the text label box. If you want to produce centered
  19. text, first determine the coordinates L and R that you want to center the
  20. text between. Insert the text label at the left edge coordinate L. Then,
  21. in the MODIFY menu, change the following three properties of the text
  22. label. Use the JUSTIFY command <[4.13]> to set the justification to
  23. CENTER. Use the BOX command <[4.15]> to set the box mode to FIXED.
  24. Finally, use the WIDTH command <[4.16]> set the box width to (R - L), the
  25. distance between the left and right edges that you have chosen. <[FIG11]>.
  26.  
  27.      If you are inserting several centered labels, you may want to start
  28. by setting the justification, box mode, and width in the G-DEFAULTS menu
  29. <[10]>. Then you do not to have to modify each text label individually.
  30. The use of the words "left" and "right" above assumes that the text is not
  31. rotated, but the same principles apply to centering text in any rotation.
  32.  
  33. <Section 16.2:  How to Copy from One Object to Another>
  34.      Copying material within an object is easy: just use MODIFY/DUPLICATE
  35. <[4.2]>. If you are copying several elements, you may want to first use
  36. the COLLECT menu <[5]> to group the elements together, rather than copying
  37. each element individually.
  38.  
  39.      To copy material from one object to another, you need to know a
  40. trick. If you want to copy from object A to object B, first use
  41. OBJECT/OPEN <[7.1]> to display object A. Then delete the material you want
  42. to copy. (If you are copying many elements, you may want to use
  43. COLLECT/DELETE <[5.9]> to do this.) Next, open object B for editing,
  44. without closing object A. Use UN-DELETE <[3.1]> to insert the deleted
  45. material into object B. Because you did not save your changes to object A,
  46. this material is now present in both objects. The un-deleted material
  47. occupies the same position in object B that it occupies in object A. Use
  48. MODIFY/MOVE <[4.1]> if you need to reposition it.
  49.  
  50.      If objects A and B are not in the same file, proceed as follows.
  51. First, use FILE/LOAD <[8.2]> to load the file containing object B. Then
  52. use OBJECT/IMPORT <[7.8]> to copy object A into that file. Now that both
  53. objects are in the loaded file, you can use the trick described above to
  54. copy the material from A into B. Finally, use OBJECT/ELIMINATE <[7.6]> to
  55. remove, from the loaded file, the definition of object A, which you no
  56. longer need.
  57.  
  58. <Section 16.3:  Keeping Notes>
  59.      Sometimes you will make changes to your standard configuration of PEP
  60. when you are creating a picture. For example, you may install a different
  61. collection of fonts, or a different pattern file, or you may change the
  62. printer rotation to print sideways (landscape) rather than right side up
  63. (portrait). You will probably want to remember these changes in case you
  64. need to edit or print that picture again. The easiest way to do this is to
  65. create a separate object in that file, giving it the name NOTES. You can
  66. then type into that object, as text labels, all the relevant PEP settings,
  67. and any other information that you think you might need later when editing
  68. or printing the pictures in that file.
  69.  
  70. <Section 16.4:  Hidden Object Names>
  71.      A complex PDL file may contain a large number of different objects.
  72. It will often happen, however, that many objects in a file are seldom
  73. directly referred to. Once created, they are not re-edited, and they
  74. appear only as components of other objects. It is therefore convenient to
  75. split the menu of all object names into two parts, those objects
  76. frequently used, and the ones that are seldom referred to. You can
  77. accomplish this by using hidden object names.
  78.  
  79.      If you give an object a name beginning with the tilde character (~),
  80. that object becomes hidden. It does not appear directly in the menu of
  81. object names. Rather, that menu contains a single entry, ~HIDDEN, that
  82. represents all of the hidden objects. If you select this menu item, a
  83. second menu appears containing the names of just the hidden objects. In
  84. this way, you can select a hidden object if you wish, but the hidden names
  85. will not appear unless specifically requested.
  86.  
  87.      To hide an object name, add the tilde character to the start of the
  88. name using either OBJECT/CLOSE <[7.2]> or OBJECT/RENAME <[7.3]>. To
  89. un-hide the object, remove the tilde with OBJECT/RENAME.
  90.  
  91. <Section 16.5:  Default Object Definitions>
  92.      When PEP is first loaded, and whenever the FILE/NEW command is
  93. executed, PEP creates a new PDL file in memory. The new PDL data contains
  94. certain default object definitions. These defaults are obtained from the
  95. file AUTO.SAM. The version of AUTO.SAM supplied with PEP contains two
  96. objects, CIRCLE and BOX. If there are objects you use repeatedly, you may
  97. want to add them to the defaults. AUTO.SAM is an ordinary PDL file; you
  98. can modify its contents by editing with PEP. Use the FILE/EXTENSIONS menu
  99. <[8.5]> to change the LOAD and SAVE extensions to SAM. Edit AUTO.SAM as
  100. you would any PDL file. After saving your changes to disk, use
  101. QUIT/RESTART <[9.4]> to restart PEP with the new default definitions
  102. installed.
  103.  
  104. <Section 16.6:  Navigating Tricks>
  105.      If you are editing a large object and need to move the active
  106. graphics window from place to place in that object as you edit, you can
  107. accomplish this by simply using the shift NumPad keys. However, there are
  108. other techniques that are often more convenient.
  109.  
  110.      If you have another graphics window in total page mode, you can
  111. position the active window using this second window for reference.
  112. Position the cursor at a selected point in the total window, and use ALT-L
  113. <[14.3.10]> or ALT-U <[14.3.17]> to move the active window display. The
  114. result is that the center (or upper left corner) of the window is
  115. positioned at the selected point.
  116.  
  117.      Alternatively, you can temporarily set the active window to total
  118. page mode (ALT-T ALT-T <[14.3.16]> will do this), select a point in the
  119. active window, and use ALT-L or ALT-U as above to position the window at
  120. that point. The former window stretch values (temporarily overridden when
  121. you set total page mode) are restored to their correct values by these
  122. window positioning commands.
  123.  
  124.      If you are editing at one point in the object, and for accuracy you
  125. want to expand the magnification (ALT-E <[14.3.4]>) or go into fatdots
  126. mode (ALT-F <[14.3.5]>), by doing so you may move the relevant point out
  127. of the active window. To prevent this, begin by setting the jump location
  128. at that point via the ALT-J command <[14.3.9]>, then use ALT-E or ALT-F as
  129. required, and finally use ALT-M <[14.3.11]> to move the active window so
  130. that the selected point is once again on view.
  131.  
  132. <Section 16.7:  How to Edit a Font File>
  133.      It is possible in PEP to add new characters to a font and to edit the
  134. shapes of existing characters. A font file is essentially a PDL file like
  135. any other, except that the objects in the file (that is, the characters)
  136. do not have object names. Normally, the absence of object names would make
  137. it impossible to open and close the objects in this file, but PEP provides
  138. a trick to overcome this difficulty.
  139.  
  140.      To edit a font, first use FILE/EXTENSIONS/LOAD <[8.5.1]> and
  141. FILE/EXTENSIONS/SAVE <[8.5.2]> to change the extensions used when loading
  142. and saving picture files. Change both extensions from PDL to FON. Then use
  143. FILE/LOAD <[8.2]> to load the font file that you want to edit. Whenever
  144. the loaded picture file has the extension FON, the behavior of OBJECT/OPEN
  145. <[7.1]> and OBJECT/CLOSE <[7.2]> is changed. To open an object in a FON
  146. file, instead of specifying an object name, you either type in its
  147. numerical ASCII code or type a single or double quote followed by the
  148. character that you want to open. To open the upper case A character, for
  149. example, you could type any one of the following. (65 is the ASCII code
  150. for upper case A.)
  151.  
  152.   65
  153.   'A
  154.   "A
  155.  
  156.      These will open the upper case A from subset 0 of the font, the
  157. subset containing the normal style characters. To open a character from a
  158. different style subset, you can add 128 times the subset number to the
  159. ASCII code, or precede the character by the subset number and a colon. To
  160. open a bold italic lower case b, for example, any of the following will
  161. work (98 is the ASCII code for lower case b and subset 3 contains the bold
  162. italic characters):
  163.  
  164.   482
  165.   3:98
  166.   3:'b
  167.   3:"b
  168.  
  169. The same formulas apply when using OBJECT/CLOSE to close a new or
  170. modified character.
  171.  
  172.      If you are creating new symbols for a font, instead of replacing
  173. existing characters you might prefer to add the new symbols to an unused
  174. font subset. The BEAMOF font contains only normal style characters (subset
  175. 0); new symbols added to it could be placed in the italic set (subset 1),
  176. for example. Before creating a new symbol, you should first examine an
  177. existing character to determine the base line coordinate, the line styles
  178. used, and so forth. You will probably want your new symbols to be
  179. compatible with these values.
  180.  
  181.      When you have finished making all your changes to the font file, use
  182. FILE/SAVE to save it back to disk. Then use FILE/EXTENSIONS/LOAD and
  183. FILE/EXTENSIONS/SAVE once more to set the picture file extensions back to
  184. PDL.
  185.  
  186.      You are now ready to use the font that you have just edited. After
  187. saving the font file, you can use the SETUP/INSTALL menu <[12.5]> to
  188. install that font into PEP. If you changed a font that was already
  189. installed, you must nevertheless re-install the font after saving the
  190. changed font file to disk. Then the changed version will be available for
  191. you to use.
  192.  
  193.      The fonts supplied with PEP contain some extra information that is
  194. used when scaling characters to maintain the symmetries in certain
  195. characters, to preserve equal stroke weight and equal serif length across
  196. the entire font, and to improve the appearance of the characters in a
  197. variety of ways. This extra information cannot be edited graphically. If
  198. you add new characters to a font this extra information will be preserved.
  199. If you modify the contents of a character, however, this information may
  200. be lost. We recommend that you not modify the contents of the characters
  201. in the PEP fonts, but if you do, be sure to keep a backup copy of the
  202. original font.
  203.  
  204.      There are some restrictions that you should know on the kinds of
  205. elements that can appear in the character objects that make up a font. You
  206. should not use colors (other than FOREGROUND) in drawing a character. When
  207. PEP uses that character in a text label all color information is ignored.
  208. You should also not use pattern fills in a character, although solid
  209. filled regions are legal. Most importantly, you should never include a
  210. text label within a character. It is illegal for a character in a font to
  211. contain text labels among its elements. If you insert text into a
  212. character while you are editing a font file, it may cause a fatal error
  213. later when you try to install or use that font.
  214.  
  215. <Section 16.8:  Printing an Old Picture on a New Printer>
  216.      PEP pictures are device independent. You can print them at any size
  217. and in any proportions on any supported output device. So if you have
  218. created a picture to print on printer A, and now you want to print it on
  219. printer B and produce a picture of the same size and proportions, that
  220. must be possible. But how exactly do you do it?
  221.  
  222.      One approach is physically to measure the output from printer A and
  223. use the PRINT/IMAGE command <[6.9]>. This is a nuisance if you have many
  224. pictures to print. Here is an easier way which is also more accurate.
  225.  
  226.      First you have to know the printer resolutions. You can find the
  227. resolution of your installed printer by using the SETUP/NUMBERS/INCH
  228. command <[12.4.5]>. Say for example, that printer A is a 300 dot per inch
  229. LaserJet and printer B is an Epson FX80 in HI-RES mode. The Epson
  230. resolutions are 120 dots per inch horizontally and 144 vertically. Set the
  231. printer stretches to 120/300 in the X direction and 144/300 in the Y
  232. direction. See <[FIG15]>. In other words, the stretches are the new
  233. printer resolution divided by the old printer resolution. Now any object
  234. printed on printer B will have the same overall size as if it had been
  235. printed on printer A with unity stretches.
  236.  
  237.      Note: if you were printing in a landscape orientation, for example 90
  238. degree rotation, you would set X to 144/300 and Y to 120/300.
  239.  
  240. <Section 16.9:  Creating a Slide Show>
  241.      You can use PEP's configuration file capability to create slide
  242. shows. Configuration files are just recorded sequences of keystrokes. When
  243. PEP is first loaded (or is restarted) it executes the commands in its
  244. configuration file just as if they had been typed in from the keyboard.
  245. Thus anything you can do in PEP can be included in a slide show, but
  246. everything must be done from the keyboard; mouse motions are not recorded
  247. in configuration files.
  248.  
  249.      To create a slide, first use QUIT/MAKEFIG <[9.3]> to start the
  250. creation of a configuration file. Then execute any set of PEP commands to
  251. produce the screen image you want to use for your 1st slide. Then press
  252. ALT-H <[14.3.7]>. Next execute more commands to produce the 2nd slide and
  253. press ALT-H again. Repeat this process once for each slide, and finally
  254. press ALT-Z <[14.3.20]> to save the slide show file to disk.
  255.  
  256.      The ALT-H commands insert pause instructions into the configuration
  257. file. These are needed because keystrokes are read out of the slide show
  258. file much faster than they were typed in. It is the pause instruction
  259. which stops PEP execution long enough for the slide to become visible.
  260. Typing any key will end a pause.
  261.  
  262.      To run a slide show, use the /F and /P command line options when you
  263. load PEP. The /F option identifies the configuration file to use and the
  264. /P option specifies the length (in seconds) of the pause whenever an ALT-H
  265. is encountered in the file. If the /P option is omitted, then PEP will
  266. wait after each slide until the user presses a key on the keyboard. For
  267. example, the command line:
  268.  
  269.      PEP /F=SHOW /P=2
  270.  
  271. loads PEP, executes the configuration file SHOW.FIG, and pauses for 2
  272. seconds whenever an ALT-H is encountered in that file.
  273.  
  274.      One simple way to construct a slide show is to draw the slides as a
  275. sequence of objects in a PDL file. Then create a slide show configuration
  276. file that loads that PDL file and opens each object in succession with a
  277. pause after each.
  278.  
  279.      You can make a slide show that will repeat indefinitely by ending
  280. your configuration file with the QUIT/RESTART command <[9.4]> and
  281. selecting the new configuration file as the one to restart with.
  282.  
  283.      Configuration files contain only the standard printing ASCII
  284. characters, so that if you want to make small changes to a slide show, you
  285. may be able to do this more easily with a text editor than by re-creating
  286. the file in PEP. Certain keys are represented by a sequence of three
  287. characters, an underscore, and two others. Thus pressing the up-arrow
  288. while creating a configuration file inserts the three characters "_up"
  289. into the file. Pressing F1 inserts "_f1". Below is the complete list of
  290. the underscore sequences that may appear.
  291.  
  292.   _bs = backspace
  293.   _bt = tab
  294.   _ff = form feed
  295.   _es = escape
  296.   _us = underscore
  297.   _up = cursor up
  298.   _dn = cursor down
  299.   _lf = cursor left
  300.   _rt = cursor right
  301.   _hm = cursor up left (home key)
  302.   _en = cursor down left (end key)
  303.   _pu = cursor up right (pgup key)
  304.   _pd = cursor down right (pgdn key)
  305.   _g+ = auto-motion (grey +)
  306.   _g- = step size toggle (grey -)
  307.   _g* = stretch cursor corner (grey *)
  308.   _bk = break
  309.   _tb = backtab
  310.   _in = insert
  311.   _de = delete
  312.   _f1 = function key F1
  313.   _f2 = function key F2 etc.
  314.   _fa = function key F10
  315.   _x1 = ALT+function key F1
  316.   _x2 = ALT+function key F2 etc.
  317.   _aa = ALT+letter A
  318.   _ab = ALT+letter B etc.
  319.   _wu = window up (shift up)
  320.   _wd = window down (shift down)
  321.   _wl = window left (shift left)
  322.   _wr = window right (shift right)
  323.   _wh = window up left (shift home)
  324.   _we = window down left (shift end)
  325.   _w9 = window up right (shift pgup)
  326.   _w3 = window down right (shift pgdn)
  327.  
  328. <Section 16.10:  Postscript Output>
  329.      Most printers supported by PEP are bitmap devices. Each pixel printed
  330. is individually specified by PEP. Postscript printers are the exception to
  331. this rule. With Postscript, you have two options. When you install PEP,
  332. you can elect to use your Postscript printer as a bitmap device like any
  333. other printer, or you can choose to communicate with it at a higher level
  334. via the Postscript language <[17.2]>.
  335.  
  336.      The advantages of choosing the Postscript language option are that
  337. printing is normally faster in this case, color output is supported, and
  338. you have access to the standard Postscript fonts. There are additional
  339. advantages if you plan to output pictures to files in the encapsulated
  340. Postscript (EPS) format. Using EPS files you can incorporate pictures
  341. drawn in PEP into documents created by many word processors and page
  342. layout programs. These EPS files will typically be shorter if the higher
  343. level option has been selected, and the picture will scale more smoothly
  344. when it is combined with other material in a document. You can enable
  345. encapsulated Postscript output by using the PRINT/DEVICE/OUTPUT command.
  346.  
  347.      However, if you output via Postscript, there will be some differences
  348. between the screen display of a picture and its appearance when printed.
  349. There are certain limitations in the translation from PEP's internal PDL
  350. representation into the Postscript language, and you should be aware of
  351. these. The following discussion assumes that you have selected the
  352. Output-Postscript option when you installed PEP. If you chose the
  353. Output-Bitmap-Graphics option, these restrictions do not apply.
  354.  
  355.      Each PEP font number is assigned to a distinct Postscript font. This
  356. assignment is fixed and independent of the PEP font also assigned to that
  357. number. Using the SETUP/INSTALL/FONT commands <[12.5.1]> will not effect
  358. the fonts used when printing to Postscript. The table below lists the PEP
  359. font numbers to be used when accessing the various Postscript fonts.
  360.  
  361.   Font 0   Times
  362.   Font 1   Helvetica
  363.   Font 2   ZapfChancery
  364.   Font 3   Bookman
  365.   Font 4   Palatino
  366.   Font 5   AvantGarde
  367.  
  368.      PEP will adjust the character spacing of these fonts to guarantee
  369. that each text label retains its correct label width when printed in
  370. Postscript. To override this correction and employ the native font metrics
  371. of the Postscript fonts, use the PRINT/DEVICE/TEXT-MODE command.
  372.  
  373.      Postscript pattern fill is accomplished by using halftone screens.
  374. Each PEP pattern number corresponds to a unique combination of size and
  375. spacing parameters for the halftone dots. Using the SETUP/INSTALL/PATTERNS
  376. <[12.5.2]> command does not change the Postscript pattern produced by a
  377. given PEP pattern number. Since halftone screens are implicitly used when
  378. producing colored images, patterns are suppressed by PEP if a filled
  379. region has a color other than black. You can avoid this elimination of
  380. patterns by using the PRINT/DEVICE/BLACK-ONLY command to disable colors in
  381. the Postscript output.
  382.  
  383.      Finally, the Postscript language does not support the range of
  384. nibtypes that can be used when drawing lines in PEP. We recommend that,
  385. for Postscript output, you use only the point and ellipse nibs. Note that
  386. the graphics libraries supplied with PEP often employ nibtypes not
  387. supported by Postscript. In some cases, objects from these files will not
  388. be faithfully reproduced when translated into Postscript.
  389.  
  390.      If you are printing an object that contains colors and you have a
  391. black and white Postscript printer, the different colors will be rendered
  392. as various shades of gray. If you want to avoid gray levels and print
  393. everything in uniform black, use the PRINT/DEVICE/BLACK-ONLY command.